package BufferStream;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class Bufferedwrite_study {
    public static void main(String[] args) throws IOException {
        BufferedWriter bw = new BufferedWriter(new FileWriter("C:\\Users\\啦啦啦\\Desktop\\b.txt",true));
        //创建对象
        bw.write("\r\n");
        //打印回车
        bw.write("我爱中国");
        bw.newLine();
        //也可以用这个来打印回车
        bw.write("我是中国人");
        bw.flush();
        //写入文件
        bw.close();
    }
}
